package rlex.classes.program;

public class ExpressionOperation extends Expression {
	private Expression left;
	private String operator;
	private Expression right;
	
	
	public Expression getLeft() {
		return left;
	}
	public void setLeft(Expression left) {
		this.left = left;
	}
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
	public Expression getRight() {
		return right;
	}
	public void setRight(Expression right) {
		this.right = right;
	}
	
	public String toString() {
		return "(" + left.toString() + " " + operator + " " + right.toString() + ")";
	}
	
	public void display(int level) {
		System.out.print("(");
		left.display(0);
		System.out.print(" ");
		System.out.print(operator);
		System.out.print(" ");
		right.display(0);
		System.out.print(")");
	}
	
}
